<!doctype html>
<html lang="en" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>方法与事件处理器v-on</title>
</head>
<body>
    <div id="example-1">
        <button type="button" v-on:click="greet">click me!</button>
    </div>

<script src="../lib/vue.js"></script>
<script>
    /*
    *v-on:click   绑定点击事件
    * event事件，event.target目标dom结构
    * */
    var exampleVm = new Vue({
        el : "#example-1",
        data : {
            message: "hello vue.js"
        },
        methods : {
            greet : function (event) {
                console.log(this.message);
                console.log(event.target.tagName)
            }
        }
    });
</script>
</body>
</html>